import '../models/budget.dart';
import '../models/goal.dart';
import '../models/saving.dart';
import '../models/transaction.dart';
import '../models/user_profile.dart';

final List<Saving> predefinedSavings = [
  // Existing data modified for the last six months
  Saving(
    name: 'Groceries Budget',
    savedAmount: 400.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2023-09-05T00:00:00.000Z'),
    remark: 'Essentials',
  ),
  Saving(
    name: 'Emergency Fund',
    savedAmount: 1200.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2023-10-10T00:00:00.000Z'),
    remark: 'Needs',
  ),
  Saving(
    name: 'Car Maintenance',
    savedAmount: 600.5,
    type: 'Withdraw',
    savingDate: DateTime.parse('2023-11-15T00:00:00.000Z'),
    remark: 'Repair',
  ),
  Saving(
    name: 'New Phone',
    savedAmount: 950.75,
    type: 'Withdraw',
    savingDate: DateTime.parse('2023-12-01T00:00:00.000Z'),
    remark: 'Gadget',
  ),
  Saving(
    name: 'Investment',
    savedAmount: 2500.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-01-20T00:00:00.000Z'),
    remark: 'Wealth',
  ),
  Saving(
    name: 'Health Insurance',
    savedAmount: 850.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-02-05T00:00:00.000Z'),
    remark: 'Medical',
  ),
  Saving(
    name: 'Emergency Fund',
    savedAmount: 1800.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-03-12T00:00:00.000Z'),
    remark: 'Needs',
  ),
  Saving(
    name: 'Travel Fund',
    savedAmount: 3000.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-04-07T00:00:00.000Z'),
    remark: 'Vacation',
  ),
  Saving(
    name: 'Laptop Upgrade',
    savedAmount: 1400.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2024-05-15T00:00:00.000Z'),
    remark: 'Work',
  ),
  Saving(
    name: 'Car Upgrade',
    savedAmount: 3200.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2024-06-20T00:00:00.000Z'),
    remark: 'Luxury',
  ),
  // Additional new data to reach 20 entries
  Saving(
    name: 'House Renovation',
    savedAmount: 5000.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-07-25T00:00:00.000Z'),
    remark: 'Home',
  ),
  Saving(
    name: 'Vacation Trip',
    savedAmount: 3200.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-08-05T00:00:00.000Z'),
    remark: 'Leisure',
  ),
  Saving(
    name: 'Gym Membership',
    savedAmount: 600.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2024-09-10T00:00:00.000Z'),
    remark: 'Fitness',
  ),
  Saving(
    name: 'Tech Gadget',
    savedAmount: 800.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2024-10-15T00:00:00.000Z'),
    remark: 'Entertainment',
  ),
  Saving(
    name: 'Medical Bills',
    savedAmount: 1300.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2024-11-10T00:00:00.000Z'),
    remark: 'Health',
  ),
  Saving(
    name: 'Furniture Upgrade',
    savedAmount: 1700.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2024-12-20T00:00:00.000Z'),
    remark: 'Home',
  ),
  Saving(
    name: 'Stock Investment',
    savedAmount: 4500.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2025-01-15T00:00:00.000Z'),
    remark: 'Finance',
  ),
  Saving(
    name: 'Pet Care',
    savedAmount: 750.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2025-02-05T00:00:00.000Z'),
    remark: 'Pets',
  ),
  Saving(
    name: 'Charity Donation',
    savedAmount: 1100.0,
    type: 'Deposit',
    savingDate: DateTime.parse('2025-03-10T00:00:00.000Z'),
    remark: 'Giving',
  ),
  Saving(
    name: 'Music Equipment',
    savedAmount: 1250.0,
    type: 'Withdraw',
    savingDate: DateTime.parse('2025-03-25T00:00:00.000Z'),
    remark: 'Hobby',
  ),
];

final List<Transaction> predefinedTransactions = [
  // Income Transactions
  Transaction(
    category: Category.freelance.displayName,
    transactionDate: DateTime.parse('2024-06-10T00:00:00.000Z'),
    subCategory: Subcategory.projectBased.displayName,
    type: 'Income',
    remark: 'Client website project',
    amount: 1500.0,
  ),
  Transaction(
    category: Category.others.displayName,
    transactionDate: DateTime.parse('2024-07-01T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Monthly paycheck',
    amount: 3000.0,
  ),
  Transaction(
    category:
        Category.freelance.displayName, // Assuming Investment category is added
    transactionDate: DateTime.parse('2024-08-15T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Quarterly dividends',
    amount: 800.0,
  ),
  Transaction(
    category:
        Category.utilities.displayName, // Assuming Business category is added
    transactionDate: DateTime.parse('2024-09-05T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Online store sales',
    amount: 2500.0,
  ),
  Transaction(
    category: Category.freelance.displayName,
    transactionDate: DateTime.parse('2024-10-20T00:00:00.000Z'),
    subCategory: Subcategory.consulting.displayName,
    type: 'Income',
    remark: 'Logo design project',
    amount: 600.0,
  ),
  Transaction(
    category: Category.housing.displayName,
    transactionDate: DateTime.parse('2024-11-10T00:00:00.000Z'),
    subCategory: Subcategory.rent.displayName,
    type: 'Income',
    remark: 'Monthly rent payment',
    amount: 1200.0,
  ),
  Transaction(
    category:
        Category.utilities.displayName, // Assuming Bonus category is added
    transactionDate: DateTime.parse('2024-12-01T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Annual performance bonus',
    amount: 1000.0,
  ),
  Transaction(
    category:
        Category.socialEvents.displayName, // Assuming Gifts category is added
    transactionDate: DateTime.parse('2025-01-25T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Gift from relatives',
    amount: 300.0,
  ),
  Transaction(
    category: Category.others.displayName,
    transactionDate: DateTime.parse('2025-02-10T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Etsy shop earnings',
    amount: 700.0,
  ),
  Transaction(
    category: Category.freelance.displayName,
    transactionDate: DateTime.parse('2025-03-01T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Income',
    remark: 'Profits from trading',
    amount: 900.0,
  ),
  // Expense Transactions
  Transaction(
    category: Category.groceries.displayName,
    transactionDate: DateTime.parse('2024-06-05T00:00:00.000Z'),
    subCategory: Subcategory.groceries.displayName,
    type: 'Expense',
    remark: 'Grocery store run',
    amount: 200.0,
  ),
  Transaction(
    category: Category.foodDining.displayName,
    transactionDate: DateTime.parse('2024-07-14T00:00:00.000Z'),
    subCategory: Subcategory.diningOut.displayName,
    type: 'Expense',
    remark: 'Dinner at a restaurant',
    amount: 150.0,
  ),
  Transaction(
    category: Category.transportation.displayName,
    transactionDate: DateTime.parse('2024-08-10T00:00:00.000Z'),
    subCategory: Subcategory.gasoline.displayName,
    type: 'Expense',
    remark: 'Fuel for the car',
    amount: 80.0,
  ),
  Transaction(
    category: Category.utilities.displayName,
    transactionDate: DateTime.parse('2024-09-15T00:00:00.000Z'),
    subCategory: Subcategory.water.displayName,
    type: 'Expense',
    remark: 'Monthly water bill',
    amount: 50.0,
  ),
  Transaction(
    category: Category.entertainment.displayName,
    transactionDate: DateTime.parse('2024-10-20T00:00:00.000Z'),
    subCategory: Subcategory.movies.displayName,
    type: 'Expense',
    remark: 'Cinema tickets',
    amount: 60.0,
  ),
  Transaction(
    category: Category.healthFitness.displayName,
    transactionDate: DateTime.parse('2024-11-05T00:00:00.000Z'),
    subCategory: Subcategory.medical.displayName,
    type: 'Expense',
    remark: 'Routine check-up',
    amount: 120.0,
  ),
  Transaction(
    category: Category.others.displayName,
    transactionDate: DateTime.parse('2024-12-25T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Expense',
    remark: 'New winter outfits',
    amount: 250.0,
  ),
  Transaction(
    category: Category
        .housing
        .displayName, // Assuming Home Maintenance category is added
    transactionDate: DateTime.parse('2025-01-30T00:00:00.000Z'),
    subCategory: Subcategory.others.displayName,
    type: 'Expense',
    remark: 'Fixing bathroom sink',
    amount: 300.0,
  ),
  Transaction(
    category: Category.education.displayName,
    transactionDate: DateTime.parse('2025-02-15T00:00:00.000Z'),
    subCategory: Subcategory.onlineCourses.displayName,
    type: 'Expense',
    remark: 'Subscription to an online course',
    amount: 200.0,
  ),
  Transaction(
    category: Category.socialEvents.displayName,
    transactionDate: DateTime.parse('2025-03-01T00:00:00.000Z'),
    subCategory: Subcategory.weddings.displayName,
    type: 'Expense',
    remark: 'Present for a friend’s wedding',
    amount: 150.0,
  ),
];

final List<Budget> predefinedBudgets = [
  Budget(
    name: 'Birthday expense',
    category: Category.others.displayName,
    target: 30000.0,
    createdDate: DateTime.parse('2024-12-20T00:00:00.000Z'),
    expense: 2000.0,
    notes: 'My birthday',
  ),
  Budget(
    name: 'Vacation to Hawaii',
    category: Category.travel.displayName,
    target: 15000.0,
    createdDate: DateTime.parse('2024-08-15T00:00:00.000Z'),
    expense: 0.0,
    notes: 'Family trip',
  ),
  Budget(
    name: 'Wedding Anniversary',
    category: Category.socialEvents.displayName,
    target: 20000.0,
    createdDate: DateTime.parse('2025-01-09T00:00:00.000Z'),
    expense: 2000.0,
    notes: 'Anniversary event',
  ),
  Budget(
    name: 'Car Maintenance',
    category: Category.transportation.displayName,
    target: 5000.0,
    createdDate: DateTime.parse('2024-11-10T00:00:00.000Z'),
    expense: 0.0,
    notes: 'Annual service',
  ),
  Budget(
    name: 'Home Renovation',
    category: Category.housing.displayName,
    target: 50000.0,
    createdDate: DateTime.parse('2024-10-01T00:00:00.000Z'),
    expense: 10000.0,
    notes: 'Kitchen and living room remodeling',
  ),
  Budget(
    name: 'Christmas Shopping',
    category: Category.others.displayName,
    target: 10000.0,
    createdDate: DateTime.parse('2024-12-10T00:00:00.000Z'),
    expense: 500.0,
    notes: 'Gifts for family and friends',
  ),
  Budget(
    name: 'New Year Celebration',
    category: Category.socialEvents.displayName,
    target: 7000.0,
    createdDate: DateTime.parse('2024-12-31T00:00:00.000Z'),
    expense: 2000.0,
    notes: 'Party and fireworks',
  ),
  Budget(
    name: 'Medical Emergency Fund',
    category: Category.healthFitness.displayName,
    target: 20000.0,
    createdDate: DateTime.parse('2025-02-15T00:00:00.000Z'),
    expense: 0.0,
    notes: 'Emergency medical expenses',
  ),
  Budget(
    name: 'Back to School',
    category: Category.education.displayName,
    target: 8000.0,
    createdDate: DateTime.parse('2025-01-01T00:00:00.000Z'),
    expense: 1000.0,
    notes: 'School supplies and tuition fees',
  ),
  Budget(
    name: 'Gym Membership',
    category: Category.healthFitness.displayName,
    target: 3000.0,
    createdDate: DateTime.parse('2025-02-01T00:00:00.000Z'),
    expense: 0.0,
    notes: 'Annual gym subscription',
  ),
];

final List<Goal> predefinedGoals = [
  Goal(
    name: 'Entertainment',
    category: GoalCategory.personalGrowth.displayName,
    date: DateTime.parse('2025-07-20T00:00:00.000Z'),
    amount: 45000.0,
    priority: 'Low',
    fund: 5000.0,
    notes: 'Live entertainment',
  ),
  Goal(
    name: 'Save for Vacation',
    category: GoalCategory.worldTravel.displayName,
    date: DateTime.parse('2025-12-15T00:00:00.000Z'),
    amount: 60000.0,
    priority: 'High',
    notes: 'Family trip',
  ),
  Goal(
    name: 'Home Renovation',
    category: GoalCategory.homeOwnership.displayName,
    date: DateTime.parse('2026-04-30T00:00:00.000Z'),
    amount: 200000.0,
    priority: 'High',
    fund: 16000.0,
    notes: 'Kitchen remodel',
  ),
  Goal(
    name: 'Buy New Car',
    category: GoalCategory.luxuryPurchase.displayName,
    date: DateTime.parse('2026-01-01T00:00:00.000Z'),
    amount: 120000.0,
    priority: 'High',
    fund: 5000.0,
    notes: 'Electric vehicle',
  ),
  Goal(
    name: 'Emergency Fund',
    category: GoalCategory.emergencyPreparedness.displayName,
    date: DateTime.parse('2025-06-30T00:00:00.000Z'),
    amount: 50000.0,
    priority: 'High',
    fund: 10000.0,
    notes: 'Unexpected expenses',
  ),
  Goal(
    name: 'Tech Upgrade',
    category: GoalCategory.fitnessAchievement.displayName,
    date: DateTime.parse('2025-09-15T00:00:00.000Z'),
    amount: 20000.0,
    priority: 'Low',
    fund: 5000.0,
    notes: 'New laptop and smartphone',
  ),
  Goal(
    name: 'Wedding Gift Savings',
    category: GoalCategory.communityService.displayName,
    date: DateTime.parse('2025-11-01T00:00:00.000Z'),
    amount: 15000.0,
    priority: 'High',
    fund: 2000.0,
    notes: 'Gift for a friend’s wedding',
  ),
  Goal(
    name: 'Charity Contribution',
    category: GoalCategory.communityService.displayName,
    date: DateTime.parse('2025-08-20T00:00:00.000Z'),
    amount: 10000.0,
    priority: 'Low',
    fund: 3000.0,
    notes: 'Donations to local charities',
  ),
  Goal(
    name: 'Fitness & Health',
    category: GoalCategory.fitnessAchievement.displayName,
    date: DateTime.parse('2025-05-10T00:00:00.000Z'),
    amount: 12000.0,
    priority: 'High',
    fund: 2000.0,
    notes: 'Gym membership and wellness programs',
  ),
];
